/**
 * 
 */
package com.ai.notices.utils.mongo;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import net.sf.json.JSONObject;

/**
 * @author microzhu
 *
 */
public class ImangeServer {
	private static Logger log = LoggerFactory.getLogger(ImangeServer.class.getName());
	public static String imageUrl ; 
	private static String confpath = "/com/ai/paas/gmimage/conf";
	private static String configurationFile="/PaasConfigurationFile.properties";
	
	static {
		Properties prop = new Properties();
		InputStream in = ImangeServer.class.getResourceAsStream(configurationFile);
		try {
			prop.load(in);
			String path = (String)prop.get(confpath);
			JSONObject json = JSONObject.fromObject(path);
			if(json.containsKey("serverUrl") ) {
				imageUrl = json.getString("serverUrl");
	        }
		} catch (IOException e) {  
			log.error("init lace.properties failed!!", e);
		}
	}
}
